function drawLearningCurv

%% parameters
cm2px = 345/13.5;
subjId = 'E1G1S01_101022';

%% Baseline performance
grp = 1;
session = 1;

fname = sprintf('../log-%s/S%s-G%02d-%02d-Trial.mat', subjId, subjId, grp, session);
load(fname);

dist = sqrt((logXt - logXc).^2 + (logYt - logYc).^2)/cm2px;

figure(1); clf;
plot(dist, 'b.', 'markersize', 5, 'linewidth', 3);
set(gca, 'box', 'off', 'fontsize', 14);
xlabel('\fontsize{14}Trial');
ylabel('\fontsize{14}Distance Error (cm)');
title(['\bf\fontsize{14}D1 Baseline - ', subjId]);
v = axis;

%% Practice performance
grp = 4;
session = 2;

fname = sprintf('../log-%s/S%s-G%02d-%02d-Trial.mat', subjId, subjId, grp, session);
load(fname);

dist = sqrt((logXt - logXc).^2 + (logYt - logYc).^2)/cm2px;
trials = 1:length(logTask);

figure(2); clf;
plot(trials(logTask==1), dist(logTask==1), 'b.', 'markersize', 5, 'linewidth', 3); hold on;
plot(trials(logTask==2),dist(logTask==2), 'g.', 'markersize', 5, 'linewidth', 3);
plot(trials(logTask==3),dist(logTask==3), 'r.', 'markersize', 5, 'linewidth', 3);
xlabel('\fontsize{14}Trial');
ylabel('\fontsize{14}Distance Error (cm)');
title(['\bf\fontsize{14}D2 Practice - ', subjId]);
axis([0 160 v(3) v(4)]);
lh = legend('Baseline', 'Scaling', 'Rotation');
set(gca, 'box', 'off', 'fontsize', 14);
set(lh, 'box', 'off')

return